package org.tinygroup.template.function.escape;

import org.apache.commons.lang.StringEscapeUtils;
import org.tinygroup.template.TemplateException;

/**
 * 默认反转义html函数(底层通过StringEscapeUtils实现)
 * @author yancheng11334
 *
 */
public class UnEscapeHtmlFunction extends AbstractEscapeFunction{

	public UnEscapeHtmlFunction() {
		super("unescapeHtml");
	}

	protected String replace(String content) throws TemplateException{
		try{
			return StringEscapeUtils.unescapeHtml(content);
		}catch(Exception e){
			throw new TemplateException(e);
		}
		
	}
}
